Required bean name is "Word1".
Examples of a typical usage of this bean follow:
(1) The direction of the bean is set to input.
MAIN.C
void main(void)
{
/* Wait until "0x55AA" is on the port */
while( Word1_GetVal() != 0x55AA );
:
}
(2) The direction of the bean is set to output.
MAIN.C
void main(void)
{
Word1_PutVal(0x55AA);
/* "0x55AA" is on the port */
for (;;) {
/* Invert output level of ninth pin on the port */
Word1_NegBit(8);
}
}
(3) The direction of the bean is set to input/output.
MAIN.C
void main(void)
{
Word1_SetDir(FALSE); // Set input mode
/* Wait until "0xFFFF" is on the port */
while( Word1_GetVal() != 0xFFFF );
Word1_SetDir(TRUE); // Set output mode
Word1_PutVal(0); // Set "0x0000" on the port
}
For more about typical usage of the bean code please refer to the page Bean Code Typical Usage.